package com.sgb.kjwl.view.ui.adapter.pick;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.ProChildListEntity;
import com.sgb.kjwl.model.entity.ProjectBuyEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class PickProjectListAdapter extends BaseRecycleAdapter<ProjectBuyEntity> {

    private TextView tvPrice;

    public PickProjectListAdapter(Context context, List<ProjectBuyEntity> datas) {
        super(context, R.layout.item_pick_project, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final ProjectBuyEntity entity) {
        holder.setBinding(BR.viewModel, entity);
        tvPrice = holder.itemView.findViewById(R.id.tv_price);

        tvPrice.setText(entity.getPrice()+entity.getPriceUnit());
    }
}
